#pragma once
#include "../Comm/Comm.h"



class ThreadCache
{
public:
	void* Allocate(size_t size);
	void Deallocate(void* obj, size_t size); 
	void ListTooLong(FreeList& list,size_t alignSize,size_t n);//归还逻辑
	void FreeThreadCache();
	
	//从中心缓存获取空间
	void* FetchFromCentralCache(size_t alignSize,size_t index);

	ThreadCache();
	~ThreadCache();


private:
	FreeList _freeLists[NFREELISTS] ;//模拟哈希结构,直接使用下标进行映射
};

